<?php
/**
 * Created by PhpStorm.
 * User: 17464
 * Date: 2020/2/5
 * Time: 21:19
 */

namespace App\Http\Requests\Goods;

use App\Http\Requests\ApiRequest;

class UpdateGoodsStatusRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 传递参数 验证规则
     *
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'ids' => 'array|required',
            'status'=> 'integer',
            'isRecommend'=> 'integer',
        ];
    }


    /**
     * 获取已定义验证规则的错误消息。
     *
     * @return array
     */
    public function messages()
    {
        return [
            'ids.required'=>'请选择商品',
            'ids.array'=>'商品参数错误',
        ];
    }
}
